﻿using Common;
using DadayunApi.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;

namespace DadayunApi
{
    public partial class ExternalAccountApi:Api
    {
        public ExternalAccountApi(AppAuthBase authBase, string baseUri) : base(authBase, baseUri)
        {
        }

        public bool IsAcountExist(string tenantName,string loginName)
        {
            var uri = "/v1/external/users/exist?tenantName="+ tenantName+ "&loginName=" + loginName;
            httpStatus = HttpGet(uri);
            
            if (httpStatus == HttpStatusCode.OK)
            {
                return responseJson == "true";
            }
            return false;
        }
    }
}
